<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>register</title>
    <link rel="stylesheet" href="lib/layui-v2.5.5/css/layui.css" media="all">
    <style>
        html, body {width: 100%;height: 100%;overflow: hidden}
        body {background:url("./resources/background.jpg");}
         .layui-container {width: 100%;height: 100%;overflow: hidden}
        .admin-login-background {width:360px;height:300px;position:absolute;left:50%;top:40%;margin-left:-180px;margin-top:-100px;}
        .logo-title {text-align:center;letter-spacing:2px;padding:14px 0;}
        .logo-title h1 {color:#1E9FFF;font-size:25px;font-weight:bold;}
        .login-form {background-color:#fff;border:1px solid #fff;border-radius:3px;padding:14px 20px;box-shadow:0 0 8px #eeeeee;}
        .login-form .layui-form-item {position:relative;}
        .login-form .layui-form-item label {position:absolute;left:1px;top:1px;width:38px;line-height:36px;text-align:center;color:#d2d2d2;}
        .login-form .layui-form-item input {padding-left:36px;}
        .captcha {width:60%;display:inline-block;}
        .captcha-img {display:inline-block;width:34%;float:right;}
        .captcha-img img {height:34px;border:1px solid #e6e6e6;height:36px;width:100%;}
    </style>
</head>
<body>
<div class="layui-container">
    <br>
    <div style='text-align:center'><img src="./resources/header_myspace.png" style="padding-top: 2em"></div>
    <div class="admin-login-background" style="padding-top: 5em">
        <div class="layui-form login-form">
            <form class="layui-form" action="./register">
                <div class="layui-form-item logo-title">
                    <h1>MySpace注册</h1>
                </div>
                <p style="font-size: 15px;font-weight: normal;color: #ff0000">
                    <% String errorMsg=(String)request.getAttribute("errorMsg");
                        if (errorMsg!=null)
                            out.print(errorMsg);
                    %>
                </p>
                <div class="layui-form-item">
                    <label class="layui-icon layui-icon-username" ></label>
                    <input type="text" name="user" lay-verify="required|account" placeholder="账号" autocomplete="off" class="layui-input" value="">
                </div>
                <div class="layui-form-item">
                    <label class="layui-icon layui-icon-username" ></label>
                    <input type="text" name="nickname" lay-verify="required|account" placeholder="昵称" autocomplete="off" class="layui-input" value="">
                </div>
                <div class="layui-form-item">
                    <label class="layui-icon layui-icon-password"></label>
                    <input type="password" name="pass" lay-verify="required|password" placeholder="密码" autocomplete="off" class="layui-input" value="">
                </div>
                <div class="layui-form-item">
                    <label class="layui-icon-vercode layui-icon "></label>
                    <input type="text" name="code" lay-verify="required|captcha" placeholder="验证码" autocomplete="off" class="layui-input verification captcha" value="">
                    <div class="captcha-img">
                        <img id="captchaPic" src="./validateCode">
                    </div>
                </div>
                <div class="layui-form-item">
                    <button class="layui-btn layui-btn-normal layui-btn-fluid" >注 册</button>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>